package com.alongstudio.account.dao;

import java.util.List;

import com.alongstudio.account.commons.exception.BusinessException;
import com.alongstudio.account.dao.base.IBaseDao;
import com.alongstudio.account.entity.Category;
import com.alongstudio.account.vo.CategoryVo;

public interface ICategoryDao extends IBaseDao<Category> {
//	List<Category> getAllCategory(String userId, String type) throws BusinessException;
	/**
	 * 获得第一级的菜单
	 * @param userId
	 * @param type
	 * @return
	 * @throws BusinessException
	 * List<Category>
	 */
	List<Category> getFirstClassCategory(String userId, String type) throws BusinessException;
	/**
	 * 获得第一级的菜单id
	 * @param userId
	 * @param type
	 * @return
	 * @throws BusinessException
	 * List<Category>
	 */
	List<String> getFirstClassCategoryIds(String userId, Integer type) throws BusinessException;
	/**
	 * 得到子节点
	 * @param parentId
	 * @return
	 * @throws BusinessException
	 * List<Category>
	 */
	List<Category> getSubClassCategoryByParentId(String parentId) throws BusinessException;
	
	/**
	 * 查找同级下最大的排序号
	 * @param vo
	 * @return
	 * @throws BusinessException
	 * Integer
	 */
	Integer queryMaxSortNum(CategoryVo vo)throws BusinessException;
}

